sdk.init((res) => {
    console.log(res);
})

//登录
sdk.login((res) => {
    console.log(res);
    sdk.goGame();
    
    res.cid = cid;
    res.gid = gid;
    faXingLogin(res);

})

// 退出登录
function wufan_loginout(){
    sdk.logout((res) => {
        console.log(res);
    })
}
function getQueryParams() {
    var urlParams = new URLSearchParams(window.location.search);
    var params = {};
    for (var param of urlParams.entries()) {
        params[param[0]] = param[1];
    }
    return params;
}



function wufan_creterole(data){

    if(data.is_save == 1){

        var roleParams = {
            roleName: 'rolename',
            serverId: 'serverid',
            serverName: 'level'
        };
        // 进入游戏
        sdk.createRole(roleParams);

    }else{

        var roleParams = {
            cpgameid: 'cpgameid',
            qqesuid: 'qqesuid',
            channelid: 'channelid',
            cpguid: 'cpguid',
            rolename: 'rolename',
            serverid: 'serverid',
            level: 'level',
            servername: 'servername',
            vip: 'vip'
        };
        // 进入游戏
        SbPulSdk.loginRole(roleParams);

    }
}



function Qiqi_pay(data){
    console.log("7724：",data);

    SbPulSdk.pay(data);
}
